spb/datacenterindex
Public
HTML 53.9%
TypeScript 44.5%
JavaScript 0.6%
SQL 0.5%
1import { notFound } from "next/navigation";2import type { ReactNode } from "react";3import { api } from "@/lib/api";45/** Existence gate — real HTTP 404 before the segment's loading.tsx streams a 200 shell (the page re-uses the cached fetch). */6export default async function CountryLayout({ children, params }: { children: ReactNode; params: Promise<{ slug: string }> }) {7 const { slug } = await params;8 const r = await api.country(slug);9 if (!r.ok && r.status === 404) notFound();10 return <>{children}</>;11}12